/*
 * @Author: 
 * @Date: 2025-06-17 11:09:11
 * @LastEditor: zhuxiaoyi
 * @LastEditTime: 2025-06-17 11:27:13
 * @Description: 
 */
/**
 * 测站类型管理实体
 * 
 * 使用 TypeORM + UUID 主键
 * 兼容 PostgreSQL 数据库
 */

import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn } from 'typeorm';

@Entity('station_type1')
export class StationType1 {
  @PrimaryGeneratedColumn('uuid')
  id: string;

  @Column({ 
    name: 'station_type_code', 
    comment: '测站类型编码',
    unique: true 
  })
  stationTypeCode: string;

  @Column({ 
    name: 'station_type_name', 
    comment: '测站类型名称' 
  })
  stationTypeName: string;

  @Column({ 
    name: 'description', 
    comment: '测站类型描述',
    nullable: true 
  })
  description?: string;

  @Column({ 
    name: 'collect_frequency', 
    comment: '数据采集频率',
    nullable: true 
  })
  collectFrequency?: string;

  @Column({ 
    name: 'status', 
    type: 'int', 
    comment: '状态(1-启用 0-禁用)',
    default: 1 
  })
  status: number;

  @Column({ 
    name: 'sort_order', 
    type: 'int', 
    comment: '排序序号',
    default: 0,
    nullable: true 
  })
  sortOrder?: number;

  @Column({ 
    name: 'remark', 
    comment: '备注信息',
    nullable: true 
  })
  remark?: string;

  @CreateDateColumn({ name: 'created_at', comment: '创建时间' })
  createdAt: Date;

  @UpdateDateColumn({ name: 'updated_at', comment: '更新时间' })
  updatedAt: Date;
}